<template>
	<view class="page">
		<!-- <view class="flex benben-position-layout flex flex-wrap align-center wrongQuestion_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub wrongQuestion_fd0_0'>
				<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
					<text class='fu-iconfont2  wrongQuestion_fd0_0_c0_c0'>&#xE794;</text>
				</view>
				<text class='wrongQuestion_fd0_0_c1'>确认预定</text>
				<view class='wrongQuestion_fd0_0_c2'>
				</view>
			</view>
		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view> -->

		<view v-if="scrollTop > 50" class="tabs_view">
			<u-tabs :list="list1" :active-item-style="activeStyle" :bar-style="barStyle" :is-scroll="false"
				:current="current" @change="change"></u-tabs>
		</view>

		<view class="loading_css" v-if="isShow">
			<u-loading size="36" color="#FC5B03"></u-loading>
			<view>加载中</view>
		</view>
		<template v-else>
			<view class="vehicle_information main0">
				<view class="car_content">
					<view class="car_name">
						<view class="car_name_1">{{carInfo.name}}</view>
						<view class="car_name_2">
							<text>{{carInfo.seats}}座</text>
							<text class="car_name_2_1">丨</text>
							<text>{{carInfo.gearbox}}</text>
							<text class="car_name_2_1">丨</text>
							<text>{{carInfo.power}}</text>
							<text class="car_name_2_1">丨</text>
							<text>{{carInfo.model}}</text>
						</view>
					</view>
					<view class="car_img">
						<u-lazy-load height="120" border-radius="16" class="car_img" :image="carInfo.image"
							:loading-img="loadingImg" :error-img="errorImg"></u-lazy-load>
						<image v-if="carInfo.type == 2" class="car_icon" :src='STATIC_URL+"220.png"' mode="aspectFill">
						</image>
					</view>
				</view>

				<view class="license_plate">
					<view class="plate_le">
						<image class="plate_le_1" :src='STATIC_URL+"227.png"'></image>
						<view class="plate_le_2">丨</view>
						<view class="plate_le_3">{{carInfo.car_number | plateNumbers}}</view>
					</view>
					<view class="plate_ri">
						<!-- <image class="plate_ri_1" :src='STATIC_URL+"228.png"'></image>
						<view class="plate_ri_2">芝麻信用-免押租车</view> -->
					</view>
				</view>
			</view>
			<view class="vehicle_method flex align-center">
				<view class="vehicle_method_item flex align-center justify-center"
					:class="door_to_door == 0 ? 'vehicle_method_item_1' : ''" @tap.stop="selectCarMethod(0)">自行到店</view>
				<view class="vehicle_method_item flex align-center justify-center"
					:class="door_to_door == 1 ? 'vehicle_method_item_2' : ''" @tap.stop="selectCarMethod(1)">
					<text>送车上门</text>
					<image v-if="is_have_poundage_fee == 0" :src='STATIC_URL+"24.png"' mode="aspectFill">
					</image>
				</view>
			</view>
			<view class="car_date">
				<view class="car_date_bg">
					<view class="time_popup flex align-center justify-between">
						<view class="time_popup_item">
							<view class="time_popup_item_1">{{timeData.week}}</view>
							<view class="time_popup_item_2">{{timeData.toDay_month}} {{timeData.toDay_time}}</view>
						</view>
						<view class="time_popup_day">
							<view class="time_popup_day_1">{{timeData.dayNum}}天</view>
							<image class="time_popup_day_2" :src='STATIC_URL+"14.png"' mode="aspectFill"></image>
						</view>
						<view class="time_popup_item">
							<view class="time_popup_item_1" style="text-align: right;">{{timeData.twoWeek}}</view>
							<view class="time_popup_item_2">{{timeData.twoDay_month}} {{timeData.twoDay_time}}</view>
						</view>
					</view>
					<view class="quotation_information" @tap.stop="openLocation">
						<view class="information">
							<view class="information_2">
								<!-- <image :src='STATIC_URL+"225.png"' mode="aspectFill"></image> -->
								<view class="information_2_1 flex align-center">
									<view class="information_2_1_1 flex align-center justify-center">取还</view>
									<view class="information_2_2_1" v-if="door_to_door == 0">自行前往门店还取车</view>
									<view class="information_2_2_1" v-if="door_to_door == 1">
										<text>商家收费上门送取车</text>
										<text class="information_2_2_3" v-if="poundage > 1">（服务费{{poundage}}）</text>
									</view>
								</view>
								<view class="information_2_2">
									<view class="information_2_2_2" v-if="door_to_door == 0">门店地址：{{storeInfo.address}}
									</view>
									<view class="information_2_2_2" v-if="door_to_door == 1">
										上门地址：{{cityInfo.cityAddress}}</view>
								</view>
							</view>
						</view>
						<view class="quotation_address">
							<image :src='STATIC_URL+"18.png"' mode="aspectFill"></image>
							<!-- <view class="address_text">地图导航</view> -->
						</view>
					</view>
				</view>

			</view>
			<view class="lianxi flex align-center justify-between" @tap.stop="getgiveMobile">
				<view class="lianxi_titel">联系店长</view>
				<image :src='STATIC_URL+"277.png"'></image>
			</view>

			<!-- #ifdef MP-ALIPAY -->
			<view class="deposit_bg flex align-center">
				<image class="deposit_1" :src='STATIC_URL+"10.png"'></image>
				<text class="deposit_2">芝麻信用 | 免押金</text>
				<text class="deposit_3 flex align-center">
					<text>芝麻分</text>
					<text>≥550</text>
					<text>可享</text>
				</text>
			</view>
			<!-- #endif -->

			<view class="guarantee main1">
				<view class="guarantee_title">车行保障</view>
				<view class="guarantee_content">
					<view class="service_title">
						<view class="title_1">
							服务内容
						</view>
						<view class="title_2">
							车损保障
						</view>
						<view class="title_2">
							三者保障
						</view>
						<view class="title_2">
							免折旧费
						</view>
						<view class="title_2">
							停运费
						</view>
						<view class="title_3">
							选择服务
						</view>
					</view>
					<view class="service_list">
						<scroll-view class="service_scroll" scroll-x="true">
							<view class="service_item service_item_active">
								<view class="item_1">
									<image :src='insureItem.image' mode="aspectFill"></image>
									<view class="">{{insureItem.name}}</view>
								</view>
								<view class="item_2">
									{{insureItem.intro}}
								</view>
								<view class="item_2">
									{{insureItem.sz}}万
								</view>
								<view class="item_2">
									{{insureItem.mczf}}
								</view>
								<view class="item_2">
									<image v-if="insureItem.has_tyf == 1" :src='STATIC_URL+"233.png"' mode="aspectFill">
									</image>
									<image v-else :src='STATIC_URL+"232.png"' mode="aspectFill"></image>
								</view>
								<view class="item_3">
									<view class="item_3_1">{{Number(insureItem.price)}}元/天</view>
									<view class="item_3_2">已包含</view>
								</view>
							</view>
							<view class="service_item" :class="v.isSelect == 1 ? 'service_item_active' : ''"
								v-for="(v, k) in insureList" :key="k" @tap.stop="selectInsure(k, insure_id)">
								<view class="item_1">
									<image :src='v.image' mode="aspectFill"></image>
									<view class="">{{v.name}}</view>
								</view>
								<view class="item_2">
									{{v.intro}}
								</view>
								<view class="item_2">
									{{v.sz}}万
								</view>
								<view class="item_2">
									{{v.mczf}}
								</view>
								<view class="item_2">
									<image v-if="v.has_tyf == 1" :src='STATIC_URL+"233.png"' mode="aspectFill"></image>
									<image v-else :src='STATIC_URL+"232.png"' mode="aspectFill"></image>

								</view>
								<view class="item_3">
									<template v-if="v.isSelect == 1">
										<view class="item_3_1">{{Number(v.price)}}元/天</view>
										<view class="item_3_2">已购买</view>
									</template>
									<template v-else>
										<view class="item_3_3">{{Number(v.price)}}元/天</view>
										<view class="item_3_4">升级</view>
									</template>
								</view>
							</view>
						</scroll-view>
					</view>
				</view>
			</view>
			<view class="preferential" @tap.stop="openCoupon">
				<view class="tip_title">优惠活动</view>
				<view class="coupon">
					<view class="coupon_le">
						次卡/团购券
					</view>

					<view class="coupon_ri">
						<image class="coupon_ri_1" :src='STATIC_URL+"234.png"'></image>
						<image :src='STATIC_URL+"208.png"'></image>
					</view>
				</view>
				<view class="flex" style="margin-top: 24rpx;font-size: 24rpx;" v-if="coupon_name">
					<view style="flex: 1;">{{coupon_name}}</view>
					<view style="margin-left: 24rpx;" v-if="reduce_money > 0">减免：￥{{Number(reduce_money)}}</view>
				</view>
			</view>

			<view class="order_detail main2">
				<view class="tip_title">订单明细</view>
				<view class="order_item">
					<view class="order_item_le">基本租金</view>
					<view class="order_item_ri" @tap.stop="seeCalendar">
						<span class="order_item_ri_1">查看价格日历</span>
						<span>￥{{Number(carInfo.price) * timeData.dayNum}}</span>
					</view>
				</view>
				<view class="order_item">
					<view class="order_item_le">基本保障服务费{{Number(insureItem.price)}}*{{timeData.dayNum}}</view>
					<view class="order_item_ri">
						<span>￥{{Number(insureItem.price) * timeData.dayNum}}</span>
					</view>
				</view>
				<view class="order_item" v-if="changeInsure">
					<view class="order_item_le">{{changeInsure.name}}{{Number(changeInsure.price)}}*{{timeData.dayNum}}
					</view>
					<view class="order_item_ri">
						<span>￥{{Number(changeInsure.price) * timeData.dayNum}}</span>
					</view>
				</view>
				<view class="order_item" v-if="door_to_door == 1">
					<view class="order_item_le">取送车上门</view>
					<view class="order_item_ri">
						<span>￥{{poundage}}</span>
					</view>
				</view>
				<view class="order_item" v-if="carInfo.new_person_price">
					<view class="order_item_le">新人优惠</view>
					<view class="order_item_ri">
						<span>-￥{{Number(carInfo.new_person_price)}}</span>
					</view>
				</view>
				<!-- <view class="order_item" v-if="coupon_name" style="display: flex;align-items: flex-start;">
					<view class="order_item_le" style="flex: 8.5;">{{coupon_name}}</view>
					<view class="order_item_ri" style="flex: 1.5;text-align: right;">
						<span v-if="reduce_money > 0">￥-{{Number(reduce_money)}}</span>
					</view>
				</view> -->
				<view class="order_line"></view>
				<view class="order_price">
					<span class="order_price_1">订单总价：</span>
					<span class="order_price_2">￥{{totalPrice > 0 ? totalPrice : 0}}</span>
				</view>
			</view>

			<!-- #ifndef MP-ALIPAY -->
			<view class="deposit">
				<view class="tip_title">
					<text>押金支付方式：</text>
					<text class="tip_title_text">芝麻信用≥550分 押金双免</text>
				</view>
				<view class="deposit_text">
					<image :src='STATIC_URL+"272.png"'></image>
					<view class="explain">
						<view class="explain_text">
							<view class="explain_text_1">到店免押</view>
							<view class="explain_text_2">在线支付租金，取车时到店扫码免押或通过其他方式</view>
						</view>
					</view>
				</view>
			</view>
			<!-- #endif -->

			<view class="notice main2">
				<view class="tip_title">预定须知</view>
				<view class="notice_item" @tap.stop="openNotice(0)">
					<view class="notice_item_le">取消规则</view>
					<image :src='STATIC_URL+"208.png"'></image>
				</view>
				<view class="notice_item" @tap.stop="openNotice(1)">
					<view class="notice_item_le">押金政策</view>
					<image :src='STATIC_URL+"208.png"'></image>
				</view>
				<view class="notice_item" @tap.stop="openNotice(2)">
					<view class="notice_item_le">取车证件</view>
					<image :src='STATIC_URL+"208.png"'></image>
				</view>
				<view class="notice_item" @tap.stop="openNotice(3)">
					<view class="notice_item_le">里程限制</view>
					<image :src='STATIC_URL+"208.png"'></image>
				</view>
			</view>
			<view class="customer_view" v-if="customer_info">
				<view class="customer_top" @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/denglu/agreement/agreement?aid=14`">
					<text>点击立即预订表示您已阅读并同意</text>
					<text class="customer_term">《预订服务协议》</text>
				</view>
				<view class="customer_botm" @tap.stop="previewImg(customer_info.image)">
					<text>预订服务提供方：</text>
					<text>{{customer_info.name}} ></text>
				</view>
			</view>

			<view class="money_footer">
				<view class="footer_le">
					<view class="footer_le_1">
						<text>￥</text>
						<text class="footer_le_1_1">{{totalPrice > 0 ? totalPrice : 0}}</text>
						<text class="footer_le_1_2">￥{{Number(underlinedPrice)}}</text>
						<!-- <text class="footer_le_1_1">{{totalPrice}}</text> -->
					</view>
					<view class="footer_le_2" v-if="reduce_money > 0">
						已优惠￥{{Number(reduce_money)}}
					</view>
				</view>
				<view class="footer_ri">
					<view class="footer_ri_1" @tap.stop="detailShow=true">明细</view>
					<view class="footer_ri_2" @tap.stop="postGenerateOrder">立即预订</view>
				</view>
			</view>

			<!-- #ifdef MP-WEIXIN -->
			<view style="position: fixed;bottom: 120rpx;left: 0;z-index: 9;width: 100%;">
				<weixin-customer :source="3" @close="customerClose"></weixin-customer>
			</view>
			<view v-if="customerStatus" style="height: 100rpx;"></view>
			<!-- #endif -->

		</template>

		<view style="height: 150rpx;"></view>

		<u-popup v-model="show" mode="center" border-radius="32">
			<view class="popup_view">
				<view class="popup_title">
					<view class="">价格日历</view>
					<u-icon @click="show=false" name="close"></u-icon>
				</view>
				<view class="popup_calendar">
					<ren-calendar ref='ren' :markDays='markDays' :headerBar='true'
						:price="Number(carInfo.price)"></ren-calendar>
				</view>
			</view>

		</u-popup>

		<u-popup v-model="buyShow" mode="bottom" border-radius="32">
			<view class="popup_price">
				<view class="popup_title">
					<view class=""></view>
					<u-icon @click="buyShow=false" name="close" color="#999"></u-icon>
				</view>
				<view class="popup_money">
					<text class="money_1">￥</text>
					<text class="money_2">325</text>
				</view>
				<view class="pay_list">
					<view class="pay_item" v-for="(item, index) in payType" :key="index" @tap.stop="selectPay(item.id)">
						<view class="pay_item_le">
							<image :src='item.icon' mode=""></image>
							<text>{{item.name}}</text>
						</view>
						<image v-if="pay_id == item.id" class="pay_item_ri" :src='STATIC_URL+"7.png"' mode=""></image>
						<image v-else class="pay_item_ri" :src='STATIC_URL+"8.png"' mode=""></image>
					</view>
				</view>
				<view class="pay_btn flex align-center justify-center" @tap.stop="postGenerateOrder">立即支付</view>
			</view>
		</u-popup>

		<u-popup v-model="noticeShow" mode="bottom" border-radius="32">
			<view class="notice_info">
				<view class="title_text">预定须知</view>
				<view class="notice_title">
					<uv-tabs :scrollable="false" :list="list2" @click="click2" :current="swiperIndex"
						:itemStyle="itemStyle" :activeStyle="activeStyle1" lineColor="#FC5B03"></uv-tabs>
				</view>
				<view class="notice_text">
					<swiper class="notice_swiper" :indicator-dots="false" :autoplay="false" :current="swiperIndex"
						:circular="false" @change="swiperIndex = $event.detail.current">
						<swiper-item>
							<view class="swiper-item">
								<u-parse :html="noticeInfo.cancel_rule"></u-parse>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="swiper-item">
								<u-parse :html="noticeInfo.deposit"></u-parse>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="swiper-item">
								<u-parse :html="noticeInfo.pick_car"></u-parse>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="swiper-item">
								<u-parse :html="noticeInfo.mileage"></u-parse>
							</view>
						</swiper-item>
					</swiper>
				</view>
			</view>
		</u-popup>

		<u-popup v-model="detailShow" mode="bottom" border-radius="32">
			<view class="notice_info">
				<view class="title_text">订单明细</view>
				<view class="order_detail">
					<view class="order_item">
						<view class="order_item_le">基本租金</view>
						<view class="order_item_ri">
							<span>￥{{Number(carInfo.price) * timeData.dayNum}}</span>
						</view>
					</view>
					<view class="order_item">
						<view class="order_item_le">基本保障服务费{{Number(insureItem.price)}}*{{timeData.dayNum}}</view>
						<view class="order_item_ri">
							<span>￥{{Number(insureItem.price) * timeData.dayNum}}</span>
						</view>
					</view>
					<view class="order_item" v-if="changeInsure">
						<view class="order_item_le">
							{{changeInsure.name}}{{Number(changeInsure.price)}}*{{timeData.dayNum}}
						</view>
						<view class="order_item_ri">
							<span>￥{{Number(changeInsure.price) * timeData.dayNum}}</span>
						</view>
					</view>
					<view class="order_item" v-if="door_to_door == 1">
						<view class="order_item_le">取送车上门</view>
						<view class="order_item_ri">
							<span>￥{{poundage}}</span>
						</view>
					</view>
					<view class="order_item" v-if="carInfo.new_person_price">
						<view class="order_item_le">新人优惠</view>
						<view class="order_item_ri">
							<span>-￥{{Number(carInfo.new_person_price)}}</span>
						</view>
					</view>
					<view class="order_item" v-if="coupon_name" style="display: flex;align-items: flex-start;">
						<view class="order_item_le" style="flex: 8.5;">{{coupon_name}}</view>
						<view class="order_item_ri" style="flex: 1.5;text-align: right;">
							<span v-if="reduce_money > 0">￥-{{Number(reduce_money)}}</span>
						</view>
					</view>
				</view>
			</view>
		</u-popup>


		<u-popup v-model="couponShow" mode="bottom" border-radius="32" z-index="999">
			<view class="popup_title">
				<view></view>
				<view class="">优惠券</view>
				<u-icon @click="couponShow=false" name="close" color="#999"></u-icon>
			</view>
			<view class="list">
				<scroll-view :scroll-y="true" class="coupon_scroll">
					<view v-for="(item, index) in couponList" :key="index"
						@tap.stop="selectCoupon(item.id, item.name, item.oprice, item.cars, item.left_num, item.is_many_days, item.coupon_type)">
						<view class="list_item">
							<view class="list_item_le">
								<view class="le_price">
									<text class="le_price_1">￥</text>
									<text class="le_price_2">{{Number(item.oprice)}}</text>
								</view>
								<view class="le_tip">部分车型最高可减免</view>
							</view>
							<view class="list_item_ri">
								<view class="ri_content">
									<view class="ri_content_1 flex justify-between">
										<view class="content_text">{{item.name}}</view>
										<view style="font-weight: 400;font-size: 30rpx;margin-left: 24rpx;">
											x{{item.left_num}}</view>
									</view>
									<view class="ri_content_2">截止：{{item.end_at}}</view>
									<!-- <view class="ri_content_3">指定门店和车型使用</view> -->
									<view class="ri_btn flex align-center justify-center">去使用</view>
								</view>

							</view>
						</view>
						<view class="rule_view">
							<view class="rule_top flex align-center justify-between" @tap.stop="selectRule(index)">
								<text>使用规则：</text>
								<u-icon v-if="!item.isSelect" name="arrow-down"></u-icon>
								<u-icon v-else name="arrow-up"></u-icon>
							</view>
							<view class="rule_bottom" v-if="item.isSelect">
								<view v-if="item.coupon_type == 1">指定门店和车型使用</view>
								<u-parse v-else :html="item.rule_text"></u-parse>
							</view>
						</view>
					</view>

				</scroll-view>
			</view>
		</u-popup>

		<u-mask :show="couponNumShow">
			<view class="warp">
				<view class="rect" @tap.stop>
					<view class="coupon_num_title">优惠券使用数量</view>
					<view class="coupon_num_text">
						<input v-model="couponUseNum" type="number" :maxlength="couponMaxNum" placeholder="请输入使用数量"
							placeholder-style="font-size: 28rpx; color: #bfbfbf">
					</view>
					<view class="coupon_num_btn flex align-center justify-between">
						<view class="coupon_num_btn_1 flex align-center justify-center" @tap.stop="cancelCoupon">取消
						</view>
						<view class="coupon_num_btn_2 flex align-center justify-center" @tap.stop="confirmCoupon">确认
						</view>
					</view>
				</view>
			</view>
		</u-mask>

		<u-mask :show="checkTimeShow">
			<view class="warp">
				<view class="rect" @tap.stop>
					<view class="coupon_num_title">提示</view>
					<view class="coupon_num_tips">当前车辆需要调车，预计需要等待1-2小时</view>
					<view class="coupon_num_btn flex align-center justify-center">
						<view class="coupon_num_btn_2 flex align-center justify-center" @tap.stop="checkTimeShow=false">
							确定
						</view>
					</view>
				</view>
			</view>
		</u-mask>

	</view>
</template>

<script>
	import RenCalendar from '../components/ren-calendar/ren-calendar.vue'
	import weixinCustomer from "@/components/customer/index.vue"
	export default {
		data() {
			return {
				"loadingImg": "",
				"errorImg": "",
				"imageUrl": "https://n.sinaimg.cn/spider20240423/618/w1267h951/20240423/00f3-b0424ba924fbe8bb330e2dabf0f7b880.jpg",
				list1: [{
						name: '预定明细',
						id: '#tabs0'
					},
					{
						name: '车行保障',
						id: '#tabs1'
					},
					// {
					// 	name: '订单明细',
					// 	id: '#tabs2'
					// },
					{
						name: '预定须知',
						id: '#tabs2'
					},
				],
				list2: [{
						name: '取消规则',
						id: ''
					},
					{
						name: '押金政策',
						id: ''
					}, {
						name: '取车证件',
						id: ''
					},
					{
						name: '里程限制',
						id: ''
					},
				],
				swiperIndex: 0,
				preActive: 0,
				currentActive: 0,
				//   为了解决点击滑动的bug，点击的时候，滑动里面不处理任何逻辑
				isTabChange: false,
				itemStyle: {
					'height': '78rpx',
					'fontSize': '26rpx',
					'color': '#666666'
				},
				activeStyle: {
					'color': '#111111',
					'fontWeight': 'bold'
				},
				activeStyle1: {
					'color': '#111111',
					'fontWeight': 'bold',
					'fontSize': '28rpx',
				},
				barStyle: {
					'backgroundColor': '#FC5B03'
				},
				scrollTop: 0, // 页面滚动距离
				showTabs: true,
				current: 0,
				tops: [],
				heights: [],
				throttle: false,

				show: false,
				curDate: '',
				markDays: [],

				buyShow: false,
				payType: [{
						name: '微信支付',
						icon: 'https://speed.zhongchuxing.com/dyimages/264.png',
						id: 1
					},
					{
						name: '支付宝支付',
						icon: 'https://speed.zhongchuxing.com/dyimages/265.png',
						id: 2
					},
					{
						name: '抖音支付',
						icon: 'https://speed.zhongchuxing.com/dyimages/263.png',
						id: 3
					}
				],
				pay_id: 1,

				isShow: true,
				store_id: "", // 门店id
				car_id: "", // 车辆id
				timeData: {}, // 租车时间
				carInfo: {}, // 车辆详情
				insureList: [], // 保障列表
				insureItem: "",
				totalPrice: 0,
				changeInsure: "",
				insureIndex: -1,
				insure_id: "",
				noticeShow: false,
				detailShow: false,
				is_submit: false,
				provider: "",
				door_to_door: "0", // 1门店自提  2送车上门
				cityInfo: {}, // 定位信息
				storeInfo: {}, // 门店信息
				order_id: "",
				pre_order_no: "", // 预支付数据接口生成的订单号
				need_pay: 0, // 需要支付的金额
				openid: "", // 微信平台openid

				couponShow: false,
				couponList: [], // 优惠券列表
				coupon_name: "",
				coupon_price: 0,
				coupon_id: "",
				coupon_num: 0, // 当前优惠券一共有多少张
				coupon_use_num: 1, // 当前优惠券用了多少张
				is_many_days: 1,
				coupon_type: 1, // 使用的优惠券类型
				is_exist: 0, // 优惠券是否存在该车型
				cars: "", // 优惠券可用车型id列表

				is_open_coupon: 1, // 是否默认选择优惠券 1是0否
				couponNumShow: false,
				couponMaxNum: 0, // 可输入的优惠券最大数量
				couponUseNum: 0, // 输入框的数量

				reduce_money: 0, // 优惠券减免金额
				groupCoupon: [], // 团购券列表
				availableCoupons: "", // 可用的优惠券
				processType: "", // 优惠券处理类型 1团购券  2优惠券 默认不处理
				underlinedPrice: 0, // 划线价

				noticeInfo: {}, // 预定须知内容
				checkTimeShow: false, // 检查时间弹框
				customerStatus: false, // 企业微信客服
				is_sequence: 0, // 是否有次卡  0没有  1有
				is_first: true, // 第一次计算不显示loading
				carry_coupon_id: "", // 车型列表携带的优惠券id
				is_have_poundage_fee: 1, // 是否有上门费用  1有 0没有
				poundage: 1,
				is_count: false,
				customer_info: "",  // 门店信息
			}
		},
		components: {
			RenCalendar,
			weixinCustomer
		},
		filters: {
			plateNumbers(value) {
				return value.slice(0, 1) + '******';
			}
		},
		onLoad(options) {
			let {
				store_id,
				car_id,
				door_to_door,
				timeData,
				storeInfo,
				is_sequence,
				coupon_id
			} = options;
			if (store_id !== undefined) this.store_id = store_id;
			if (car_id !== undefined) this.car_id = car_id;
			if (is_sequence !== undefined) this.is_sequence = is_sequence;
			if (coupon_id !== undefined) this.carry_coupon_id = coupon_id;
			if (door_to_door !== undefined) this.door_to_door = door_to_door;
			this.storeInfo = uni.getStorageSync('store');
			this.cityInfo = uni.getStorageSync('city');
			if (timeData) {
				this.timeData = JSON.parse(timeData);
			} else {
				this.timeData = global.timeData;
			}
			// console.log(this.timeData);
			// console.log(this.storeInfo);
			this.getdiffdate((this.timeData.toDay).slice(0, 10), (this.timeData.twoDay).slice(0, 10));
			this.getOrderInfo();

			let _this = this;
			uni.getProvider({
				service: 'payment',
				success: res => {
					console.log(res);
					_this.provider = res.provider[0];
				},
				fail: err => {
					console.log(err);
				}
			})

			// #ifdef MP-WEIXIN || MP-ALIPAY
			this.initCode();
			// #endif

			this.getNotice();

		},
		onShow() {
			// #ifdef MP-WEIXIN
			let customerStatus = this.$store.state.customerStatus[2].status;
			this.customerStatus = customerStatus;
			// #endif
		},
		onReady() {

		},
		onUnload() {
			this.is_open_coupon = 1;
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
			if (this.scrollTop < this.heights[0]) {
				this.current = 0;
				return;
			}
			if (this.scrollTop >= this.heights[0] && this.scrollTop < this.heights[0] + this.heights[1]) {
				this.current = 1;
				return;
			}
			if (this.scrollTop >= this.heights[0] + this.heights[1] && this.scrollTop < this.heights[0] + this.heights[1] +
				100) {
				this.current = 2;
				return;
			}
			if (this.scrollTop >= this.heights[0] + this.heights[1]) {
				this.current = 3;
				return;
			}
			return;


			//节流方法
			if (!this.throttle) {
				this.throttle = true;
				setTimeout(() => {
					this.throttle = false;
				}, 210);
				for (let i = 0; i < this.list1.length; i++) {
					if (i == this.list1.length - 1) {
						if (e.scrollTop >= this.tops[i] - uni.upx2px(88)) {
							this.current = i;
						}
						return;
					}
					if (
						e.scrollTop >= this.tops[i] - uni.upx2px(88) &&
						e.scrollTop < this.tops[i + 1] - uni.upx2px(88)
					) {
						this.current = i;
					}
				}
			}
		},

		methods: {
			// 获取预定须知 getBookingNotice
			getNotice() {
				this.$api.get(global.apiUrls.getBookingNotice, {

				}).then(res => {
					if (res.data.code == 1) {
						this.noticeInfo = res.data.data;
					} else {
						this.$message.info(res.data.info);
					}
				})
			},


			selectRule(index) {
				this.couponList[index].isSelect = !this.couponList[index].isSelect;
				this.$forceUpdate();
			},
			// 团购券列表  userCouponList
			getCouponList() {
				this.$api.post(global.apiUrls.userCouponList, {
					user_id: this.carInfo.user_info.id,
					status: 0,
					start_time: this.timeData.toDay,
					end_time: this.timeData.twoDay
				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						let filterList = [];
						if (res.data.data.length > 0) {
							if (this.is_sequence == 0) {
								filterList = res.data.data.filter(e => e.coupon_type != 15 && e.is_use == 1);
							} else {
								filterList = res.data.data.filter(e => (e.coupon_type == 15 && e.card_count <= this
									.timeData.dayNum));
							}
						} else {
							this.getPrice();
						}
						// console.log(filterList);
						this.couponList = filterList;
						if (this.carry_coupon_id) {
							let couponInfo = "";
							let couponIndex = "";
							couponIndex = this.couponList.findIndex(e => e.id == this.carry_coupon_id);
							if (couponIndex != -1) {
								couponInfo = this.couponList[couponIndex];
							}
							if (couponInfo) {
								this.selectCoupon(couponInfo.id, couponInfo.name, couponInfo.oprice, couponInfo
									.cars, couponInfo.left_num, couponInfo.is_many_days, couponInfo.coupon_type
								);
							}
							console.log("车型列表选择的优惠券", couponInfo);
						} else {
							if (this.couponList.length > 0) {
								this.groupCoupon = [];
								this.couponList.forEach((v, k) => {
									v.isSelect = false;
									if (this.is_sequence == 1) {
										// 次卡
										if (v.coupon_type == 15) {
											this.groupCoupon.push(v);
										} else {
											this.availableCoupons = v;
										}
									} else if (this.is_sequence == 0) {
										// 团购
										if (v.coupon_type == 1) {
											this.groupCoupon.push(v);
										} else {
											this.availableCoupons = v;
										}
									}
								})
							}

							if (this.groupCoupon.length > 0) {
								let couponIndex = -1;
								let carIndex = -1;
								let carsList = [];
								let carsMoneyList = [];
								for (let i = 0; i < this.groupCoupon.length; i++) {

									let arr = [];
									arr = this.groupCoupon[i].cars.split(',');
									carIndex = arr.indexOf(this.carInfo.car_id.toString());
									if (carIndex != -1) {
										carsList.push(this.groupCoupon[i]);
										couponIndex = i;
									}
								}
								let couponInfo = "";
								if (couponIndex != -1) {
									couponInfo = this.findClosestValue(carsList, this.timeData.dayNum, 1);
								} else {
									couponInfo = this.findClosestValue(this.groupCoupon, this.timeData.dayNum, 2);
								}
								if (couponInfo) {
									this.selectCoupon(couponInfo.id, couponInfo.name, couponInfo.oprice, couponInfo
										.cars, couponInfo.left_num, couponInfo.is_many_days, couponInfo
										.coupon_type
									);
								}
								console.log(couponInfo);
							} else if (this.availableCoupons) {
								this.selectCoupon(this.availableCoupons.id, this.availableCoupons.name, this
									.availableCoupons.oprice, this.availableCoupons
									.cars, this.availableCoupons.left_num, this.availableCoupons.is_many_days,
									this.availableCoupons.coupon_type
								);
							} else {
								this.getPrice();
							}
						}

						this.is_open_coupon = 1;
					} else {
						this.$message.info(res.data.info);
					}
				})
			},
			// 获取到最接近的优惠券或次卡
			findClosestValue(arr, target, type) {
				let closestItem = null;
				let smallestDifference = Infinity;
				let sortedArr = [];
				if (type == 1) {
					sortedArr = arr;
				} else {
					sortedArr = [...arr].sort((a, b) => (b.oprice - a.oprice));
					sortedArr = sortedArr.sort((a, b) => (b.left_num - a.left_num));
				}
				if (this.is_sequence == 0) {
					sortedArr.forEach(item => {
						let difference = Math.abs(item.left_num - target);
						if ((difference < smallestDifference) && item.is_many_days != 0) {
							smallestDifference = difference;
							closestItem = item;
						}
					});
				} else if (this.is_sequence == 1) {
					sortedArr.forEach(item => {
						let difference = Math.abs(item.card_count - target) + Math.abs(item.oprice - this.carInfo
							.price);
						if (difference < smallestDifference) {
							smallestDifference = difference;
							closestItem = item;
						}
					});
				}
				console.log(sortedArr);
				return closestItem ? closestItem : sortedArr[0];

			},
			openCoupon() {
				if (this.couponList.length == 0) {
					this.$message.info('暂无可用优惠券');
					return;
				}
				this.is_open_coupon = 0;
				this.couponShow = true;
			},
			selectCoupon(id, name, price, cars, num, is_many_days, coupon_type) {
				this.coupon_id = id;
				this.coupon_name = name;
				this.coupon_price = price;
				this.coupon_num = num;
				this.cars = cars;
				this.is_many_days = is_many_days;
				this.coupon_type = coupon_type;
				this.couponShow = false;

				if (coupon_type == 1 || coupon_type == 15) {
					// console.log(this.cars);
					if (this.is_open_coupon == 1) {
						this.getPrice();
					} else {
						// 非次卡
						if (this.is_sequence == 0) {
							if (num > 1) {
								let use_num = this.countUseNum();
								this.couponUseNum = use_num;
								this.couponNumShow = true;
							} else {
								this.getPrice();
							}
						} else {
							// 次卡
							this.getPrice();
						}
					}
				} else {
					let item = "";
					this.couponList.forEach((v, k) => {
						if (id == v.id) {
							this.availableCoupons = v;
						}
					})
					this.getPrice();
				}
			},
			// 计算使用天数
			countUseNum() {
				let use_num = 1;
				if (this.coupon_type == 1) {
					if (this.coupon_num >= this.timeData.dayNum) {
						if (this.is_many_days == 0) {
							this.couponMaxNum = 1;
							use_num = 1;
						} else {
							this.couponMaxNum = this.timeData.dayNum;
							use_num = this.timeData.dayNum;
						}
					} else {
						if (this.is_many_days == 0) {
							this.couponMaxNum = 1;
							use_num = 1;
						} else {
							this.couponMaxNum = this.coupon_num;
							use_num = this.coupon_num;
						}
					}
				} else if (this.coupon_type == 15) {
					this.couponMaxNum = 1;
					use_num = (this.couponList.filter(e => e.id == this.coupon_id))[0].card_count;
				}
				return use_num;
			},

			confirmCoupon() {
				if (this.couponUseNum <= 0) {
					this.$message.info('请输入团购券使用数量');
					return;
				}
				if (this.couponUseNum > this.couponMaxNum) {
					this.$message.info(`当前团购券最多只能使用${this.couponMaxNum}张`);
					return;
				}
				this.couponShow = false;
				this.couponNumShow = false;
				uni.hideKeyboard();
				this.getPrice();
			},
			cancelCoupon() {
				this.couponNumShow = false;
			},
			selectCarMethod(type) {
				if (this.is_count) return;
				this.is_count = true;
				this.poundage = 1;
				this.door_to_door = type;
				this.getPrice();
			},
			// 根据接口计算需要支付的价格  computePrice
			getPrice() {
				if (!this.is_first) {
					uni.showLoading({
						title: '计算中'
					})
				}
				let use_num = 1;
				if (this.couponUseNum > 0) {
					use_num = this.couponUseNum;
				} else {
					use_num = this.countUseNum();
				}
				this.coupon_use_num = use_num;
				console.log("计算价格的buying_num", this.coupon_use_num);
				this.$api.post(global.apiUrls.computePrice, {
					coupon_type: this.coupon_type ? this.coupon_type : "",
					buying_num: this.is_sequence == 1 ? 1 : use_num,
					goods_order_id: this.coupon_id ? this.coupon_id : "",
					real_car_id: this.carInfo.real_car_id,
					store_id: this.store_id,
					take_at: this.timeData.toDay,
					repay_at: this.timeData.twoDay,
					door_to_door: this.door_to_door == 0 ? 1 : 2, //:1=自提,2=上门送车
					is_free_deposit: 1, // 是否免押金不能为空:1=不免押,2=免押
					type: 0, // 订单类型:0=普通订单,1=优惠劵
					free_deposit_type: 1, // 免押类型:1=到店免押,2=其他
					insure_plus_id: this.changeInsure ? this.changeInsure.id : "",
					lng: this.door_to_door == 0 ? this.storeInfo.lng : this.cityInfo.lng,
					lat: this.door_to_door == 0 ? this.storeInfo.lat : this.cityInfo.lat,
					address: this.door_to_door == 0 ? this.storeInfo.address : this.cityInfo.cityAddress,
					car_type: this.carInfo.car_type
				}).then(res => {
					console.log("计算金额", res);
					uni.hideLoading();
					this.is_count = false;
					this.is_first = false;
					if (res.data.code == 1) {
						this.totalPrice = Number(res.data.data.need_pay);
						this.reduce_money = res.data.data.priceToGood;
						this.poundage = Number(res.data.data.poundage);
						this.is_have_poundage_fee = res.data.data.is_have_poundage_fee;
						// 计算划线价
						this.underlinedPrice = (Number(this.carInfo.price) * this.timeData.dayNum) + (
								Number(this.insureItem.price) * this.timeData.dayNum) + (this
								.changeInsure ? (Number(this.changeInsure.price) * this.timeData.dayNum) : 0) +
							this.poundage - Number(this.carInfo.new_person_price);
					} else {
						this.$message.info(res.data.info);
					}
				}).catch(err => {
					this.is_count = false;
					this.is_first = false;
				})
			},
			// 处理优惠券计算逻辑
			processCoupons(type) {
				// console.log(type);
				let use_num = 1;
				if (this.couponUseNum > 0) {
					use_num = this.couponUseNum;
				} else {
					use_num = this.countUseNum();
				}
				console.log("计算buying_num", use_num);
				if (type == undefined) {
					this.processType = "";
				} else {
					this.processType = type;
				}
				// 所有收费项加一起的原价格
				let realPrice = (Number(this.carInfo.price) * this.timeData.dayNum) + (
					Number(this.insureItem.price) * this.timeData.dayNum) + (this
					.changeInsure ? (Number(this.changeInsure.price) * this.timeData.dayNum) : 0) + Number(this
					.carInfo.door_to_door_price) - Number(this.carInfo.new_person_price);
				if (type == 1) {
					// 团购券或次卡优先
					let carsArr = this.cars.split(',');
					let index = carsArr.indexOf(this.carInfo.car_id.toString());
					console.log('次卡')
					if (index != -1) {
						console.log('次卡直接抵扣天');
						if (this.is_sequence == 1) {
							use_num = (this.couponList.filter(e => e.id == this.coupon_id))[0].card_count;
						}
						this.totalPrice = (Number(this.carInfo.price) * (this.timeData.dayNum - use_num)) + (
							Number(this.insureItem.price) * (this.timeData.dayNum - use_num)) + (this
							.changeInsure ? (Number(this.changeInsure.price) * this.timeData.dayNum) : 0) + Number(this
							.carInfo.door_to_door_price) - Number(this.carInfo.new_person_price);

						this.reduce_money = (Number(this.carInfo.price) + Number(this.insureItem.price)) * use_num;
						// if ((Number(this.carInfo.price) + Number(this.insureItem.price)) <= this.coupon_price) {
						// 	this.reduce_money = this.coupon_price * use_num;
						// } else {
						// 	this.reduce_money = (Number(this.carInfo.price) + Number(this.insureItem.price)) * use_num;
						// }
						this.is_exist = 1;
					} else {
						// 车型金额小于等于优惠券金额
						if (Number(this.carInfo.price) < this.coupon_price) {
							console.log('次卡1')
							if (this.is_sequence == 0) {
								this.totalPrice = (Number(this.carInfo.price) * (this.timeData.dayNum - use_num)) +
									(Number(this.insureItem
										.price) * (this.timeData.dayNum - use_num)) + (this.changeInsure ? (Number(
											this.changeInsure.price) * this
										.timeData.dayNum) : 0) + Number(this.carInfo.door_to_door_price) - Number(this
										.carInfo
										.new_person_price);
							} else if (this.is_sequence == 1) {
								this.totalPrice = (Number(this.carInfo.price) * (this.timeData.dayNum)) +
									(Number(this.insureItem
										.price) * (this.timeData.dayNum)) + (this.changeInsure ? (Number(
											this.changeInsure.price) * this
										.timeData.dayNum) : 0) + Number(this.carInfo.door_to_door_price) - Number(this
										.carInfo
										.new_person_price) - this.coupon_price;
							}
							if (Number(this.carInfo.price) >= this.coupon_price) {
								console.log('次卡1-1')
								if (this.is_sequence == 0) {
									this.reduce_money = this.coupon_price * use_num;
								} else if (this.is_sequence == 1) {
									this.reduce_money = this.coupon_price;
								}
							} else {
								console.log('次卡1-2')
								if (this.is_sequence == 0) {
									this.reduce_money = (Number(this.carInfo.price) + Number(this.insureItem.price)) *
										use_num;
								} else if (this.is_sequence == 1) {
									if (realPrice >= this.coupon_price) {
										this.reduce_money = this.coupon_price;
									} else {
										this.reduce_money = (Number(this.carInfo.price) + Number(this.insureItem.price)) *
											use_num;
									}
								}
							}
						} else {
							console.log('次卡2')
							let remain_day
							if (this.is_sequence == 0) {
								remain_day = this.timeData.dayNum - use_num;
							} else if (this.is_sequence == 1) {
								remain_day = this.timeData.dayNum;
							}
							console.log(remain_day);
							if (remain_day == 0) {
								this.totalPrice = ((Number(this.carInfo.price) - this.coupon_price) * this.timeData
										.dayNum) + (Number(this.insureItem
										.price) * this.timeData.dayNum) + (this.changeInsure ? (Number(this.changeInsure
										.price) * this.timeData.dayNum) : 0) + Number(this.carInfo.door_to_door_price) -
									Number(this.carInfo.new_person_price);
							} else {
								if (Number(this.carInfo.price) >= this.coupon_price) {
									if (this.is_sequence == 0) {
										this.totalPrice = ((Number(this.carInfo.price) + Number(this.insureItem.price) -
											this
											.coupon_price) * use_num) + (Number(this.carInfo.price) *
											remain_day) + (Number(this.insureItem
											.price) * remain_day) + (this.changeInsure ? (Number(this.changeInsure
												.price) *
											remain_day) : 0) + Number(this.carInfo.door_to_door_price) - Number(this
											.carInfo
											.new_person_price)
									} else if (this.is_sequence == 1) {
										this.totalPrice = ((Number(this.carInfo.price) + Number(this.insureItem.price)) *
												remain_day) + (this.changeInsure ? (Number(this.changeInsure.price) *
												remain_day) : 0) + Number(this.carInfo.door_to_door_price) - Number(this
												.carInfo
												.new_person_price) - this
											.coupon_price
									}
								}
							}
							if (Number(this.carInfo.price) >= this.coupon_price) {
								if (this.is_sequence == 0) {
									this.reduce_money = this.coupon_price * use_num;
								} else if (this.is_sequence == 1) {
									this.reduce_money = this.coupon_price;
								}
								// this.reduce_money = (this.coupon_price * use_num) + (Number(this.insureItem.price) * use_num);
							}
						}
						this.is_exist = 0;
					}
				} else if (type == 2) {
					// 如果没有团购券，有优惠券
					console.log('无次卡');
					this.availableCoupons.cars.forEach((v, k) => {
						if (this.carInfo.car_id == v.car_id) {
							this.coupon_price = Number(v.price);
						}
					})
					this.coupon_id = this.availableCoupons.id;
					this.coupon_name = this.availableCoupons.name;
					this.coupon_num = this.availableCoupons.left_num;
					let remain_day = this.timeData.dayNum - 1;
					if (remain_day == 0) {
						this.totalPrice = this.coupon_price + (this.changeInsure ? (Number(this.changeInsure
								.price) * this.timeData.dayNum) : 0) + Number(this.carInfo.door_to_door_price) -
							Number(this.carInfo.new_person_price);
					} else {
						this.totalPrice = this.coupon_price + (Number(this.carInfo.price) * remain_day) + (Number(this
							.insureItem
							.price) * remain_day) + (this.changeInsure ? (Number(this.changeInsure.price) *
							this.timeData.dayNum) : 0) + Number(this.carInfo.door_to_door_price) - Number(this
							.carInfo
							.new_person_price)
					}
					this.reduce_money = Number(this.carInfo.price) + Number(this.insureItem.price) - this.coupon_price;
				} else {
					// 两个都没有
					this.totalPrice = (Number(this.carInfo.price) * this.timeData.dayNum) + (
						Number(this.insureItem.price) * this.timeData.dayNum) + (this
						.changeInsure ? (Number(this.changeInsure.price) * this.timeData.dayNum) : 0) + Number(this
						.carInfo.door_to_door_price) - Number(this.carInfo.new_person_price);
				}
				// 计算划线价
				this.underlinedPrice = (Number(this.carInfo.price) * this.timeData.dayNum) + (
					Number(this.insureItem.price) * this.timeData.dayNum) + (this
					.changeInsure ? (Number(this.changeInsure.price) * this.timeData.dayNum) : 0) + Number(this
					.carInfo.door_to_door_price) - Number(this.carInfo.new_person_price);

				this.couponShow = false;
				this.couponNumShow = false;
				this.coupon_use_num = use_num;
			},
			// 处理对象转数组
			convertToLabelValuePair(obj) {
				return Object.entries(obj).map(([key, value]) => ({
					label: key,
					value: value
				}));
			},

			// 生成订单   generateOrder
			postGenerateOrder() {
				console.log("生成订单buying_num", this.coupon_use_num);
				if (this.is_submit) return;
				this.is_submit = true;
				// 抖音、微信
				// #ifndef MP-ALIPAY
				uni.showLoading({
					title: '预定中'
				})
				this.$api.post(global.apiUrls.generateOrder, {
					coupon_type: this.coupon_type,
					buying_num: this.is_sequence == 1 ? 1 : this.coupon_use_num,
					goods_order_id: this.coupon_id ? this.coupon_id : "",
					real_car_id: this.carInfo.real_car_id,
					store_id: this.store_id,
					take_at: this.timeData.toDay,
					repay_at: this.timeData.twoDay,
					door_to_door: this.door_to_door == 0 ? 1 : 2, //:1=自提,2=上门送车
					is_free_deposit: 1, // 是否免押金不能为空:1=不免押,2=免押
					type: 0, // 订单类型:0=普通订单,1=优惠劵
					free_deposit_type: 1, // 免押类型:1=到店免押,2=其他
					insure_plus_id: this.changeInsure ? this.changeInsure.id : "",
					lng: this.door_to_door == 0 ? this.storeInfo.lng : this.cityInfo.lng,
					lat: this.door_to_door == 0 ? this.storeInfo.lat : this.cityInfo.lat,
					address: this.door_to_door == 0 ? this.storeInfo.address : this.cityInfo.cityAddress,
					car_type: this.carInfo.car_type
				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						uni.hideLoading();
						this.order_id = res.data.data.order_id;
						uni.$emit('creatdOrder');
						if (res.data.data.need_pay == 0) {
							this.$message.info('预定成功');
							setTimeout(() => {
								this.is_submit = false;
								uni.redirectTo({
									url: '/pages/index/reserveOrder/reserveSuccess'
								})
							}, 800)
						} else {
							// #ifdef MP-TOUTIAO
							this.creatPrepayment();
							// #endif

							// #ifdef MP-WEIXIN
							this.creatWeixinpayment();
							// #endif
						}

					} else {
						uni.hideLoading();
						this.$message.info(res.data.info);
						this.is_submit = false;
					}
				}).catch(err => {
					this.is_submit = false;
					uni.hideLoading();
				})
				// #endif


				// 支付宝
				// #ifdef MP-ALIPAY
				uni.showLoading({
					title: '预定中'
				})
				this.$api.post(global.apiUrls.generateNewOrder, {
					coupon_type: this.coupon_type,
					buying_num: this.is_sequence == 1 ? 1 : this.coupon_use_num,
					goods_order_id: this.coupon_id ? this.coupon_id : "",
					real_car_id: this.carInfo.real_car_id,
					store_id: this.store_id,
					take_at: this.timeData.toDay,
					repay_at: this.timeData.twoDay,
					door_to_door: this.door_to_door == 0 ? 1 : 2, //:1=自提,2=上门送车
					is_free_deposit: 1, // 是否免押金不能为空:1=不免押,2=免押
					type: 0, // 订单类型:0=普通订单,1=优惠劵
					free_deposit_type: 1, // 免押类型:1=到店免押,2=其他
					insure_plus_id: this.changeInsure ? this.changeInsure.id : "",
					lng: this.door_to_door == 0 ? this.storeInfo.lng : this.cityInfo.lng,
					lat: this.door_to_door == 0 ? this.storeInfo.lat : this.cityInfo.lat,
					address: this.door_to_door == 0 ? this.storeInfo.address : this.cityInfo.cityAddress,
					version: 1,
					car_type: this.carInfo.car_type
				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						uni.hideLoading();
						this.order_id = res.data.data.order_id;
						uni.$emit('creatdOrder');
						this.$message.info('预定成功');
						setTimeout(() => {
							uni.redirectTo({
								url: '/pages/index/reserveOrder/confirmOrder?door_to_door=' + this
									.door_to_door + '&order_id=' + this.order_id +
									'&insure_plus_id=' + (this.changeInsure ? this.changeInsure
										.id : "-1") + '&reduce_money=' + this.reduce_money +
									'&underlinedPrice=' + this.underlinedPrice + '&poundage=' + this.poundage
							})
						}, 800)
					} else {
						uni.hideLoading();
						this.$message.info(res.data.info);
						this.is_submit = false;
					}
				}).catch(err => {
					this.is_submit = false;
					uni.hideLoading();
				})
				// #endif


			},
			// 获取微信openid  支付宝
			initCode() {
				let _this = this;
				let type = "";
				// #ifdef MP-WEIXIN
				type = 2;
				// #endif

				// #ifdef MP-ALIPAY
				type = 3;
				// #endif
				uni.login({
					success: res => {
						console.log(res);
						_this.$api.post(global.apiUrls.postgetOpenid, {
							code: res.code,
							type: type
						}).then(res => {
							if (res.data.code == 1) {
								_this.openid = res.data.data.openid;
							} else {
								_this.$message.info(res.data.info);
							}
						})
					},
					fail: err => {
						console.log(err);
					}
				})
			},
			// 生成微信预支付数据  postweixinPay
			creatWeixinpayment() {
				this.$api.post(global.apiUrls.postweixinPay, {
					order_id: this.order_id,
					pay_type: 3,
					openid: this.openid,
					is_hello: 0,  // 0中出行  1哈啰
				}).then(result => {
					// console.log(result);
					uni.hideLoading();
					if (result.data.code == 1) {
						let _this = this;
						uni.requestPayment({
							provider: 'wxpay',
							// #ifdef MP-WEIXIN
							timeStamp: result.data.data.timeStamp,
							nonceStr: result.data.data.nonceStr,
							package: result.data.data.package,
							signType: result.data.data.signType,
							paySign: result.data.data.paySign,
							// #endif
							// #ifdef APP-PLUS
							orderInfo: data,
							// #endif
							success: (e) => {
								console.log('success', e)
								_this.$message.info('支付成功');
								setTimeout(() => {
									_this.is_submit = false;
									uni.redirectTo({
										url: '/pages/index/reserveOrder/reserveSuccess'
									})
								}, 800)
							},
							fail: (e) => {
								console.log(e);
								// #ifdef APP-PLUS
								let failMsg = 'requestPayment:fail canceled';
								// #endif
								// #ifndef APP-PLUS
								let failMsg = 'requestPayment:fail cancel';
								// #endif
								if (e.errMsg == failMsg) {
									_this.$message.info('支付已取消');
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/my/myOrder/orderDetails?order_id=' +
												_this.order_id
										})
									}, 800)
								} else {
									_this.$message.info('支付失败,请稍后重试');
								}
								_this.is_submit = false;
							},
							complete: () => {}
						});
					} else {
						this.is_submit = false;
						this.$message.info(result.data.info);
					}
				})
			},
			// 生成支付宝预支付数据
			creatAlipaynpayment() {
				this.$api.post(global.apiUrls.postAlipayPay, {
					order_id: this.order_id,
					openid: this.openid
				}).then(result => {
					// console.log(result);
					uni.hideLoading();
					// return;
					if (result.data.code == 1) {
						let _this = this;
						uni.requestPayment({
							provider: 'alipay',
							orderInfo: result.data.data.trade_no,
							success: (e) => {
								console.log('success', e)
								if (e.resultCode == 9000) {
									_this.$message.info('支付成功');
									setTimeout(() => {
										_this.is_submit = false;
										uni.redirectTo({
											url: '/pages/index/reserveOrder/reserveSuccess'
										})
									}, 800)
								} else if (e.resultCode == 6001 || e.resultCode == 6002) {
									_this.$message.info('支付已取消');
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/my/myOrder/orderDetails?order_id=' +
												_this.order_id
										})
									}, 800)
								} else {
									_this.$message.info('支付失败，请重试');
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/my/myOrder/orderDetails?order_id=' +
												_this.order_id
										})
									}, 800)
								}

							},
							fail: (e) => {
								console.log(e);
								// #ifdef APP-PLUS
								let failMsg = 'requestPayment:fail canceled';
								// #endif
								// #ifndef APP-PLUS
								let failMsg = 'requestPayment:fail cancel';
								// #endif
								if (e.errMsg == failMsg) {
									_this.$message.info('支付已取消');
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/my/myOrder/orderDetails?order_id=' +
												_this.order_id
										})
									}, 800)
								} else {
									_this.$message.info('支付失败,请稍后重试');
								}
								_this.is_submit = false;
							},
							complete: () => {}
						});
					} else {
						this.is_submit = false;
						this.$message.info(result.data.info);
					}
				})
			},

			// 生成抖音预支付数据  postPrepayment
			creatPrepayment() {
				this.$api.post(global.apiUrls.postPrepayment, {
					order_id: this.order_id
				}).then(res => {
					console.log(res);
					uni.hideLoading();
					// return;
					if (res.data.code == 1) {
						this.pre_order_no = res.data.data.order_no;
						this.need_pay = res.data.data.need_pay;
						// console.log(this.pre_order_no);
						let _this = this;

						let params = {
							order_id: _this.order_id.toString()
						}
						let skulist = [{
							quantity: 1, // 购买数量 必填
							price: Number(_this.need_pay) * 100, // 商品价格 必填
							discountAmount: 0,
							skuId: String(res.data.data.product_id),
							// goodsId: '7399923302912788543', // 商品ID 必填
							skuType: 2, // 商品类型 必填
							goodsInfo: {
								goodsName: _this.carInfo.name, // 商品名称 必填
								goodsPhoto: _this.carInfo.image, // 商品图片链接 必填
								goodsId: String(res.data.data.product_id), // 商品ID 必填
								goodsType: 1
							}
						}]
						let totalAmount = _this.need_pay * 100
						// console.log(totalAmount);
						// console.log(global.apiUrls.callbackUrl);
						console.log(skulist);
						tt.createOrder({
							skuList: skulist,
							payment: {
								totalAmount: totalAmount, // 订单总价 必填
							},
							callbackData: {
								order_no: _this.pre_order_no
							},
							callbackUrl: global.apiUrls.callbackUrl,
							success: (res) => {
								const {
									orderId,
									outOrderNo
								} = res;
								console.log("success res", res);
								console.log("orderId", orderId, "outOrderNo", outOrderNo);
								setTimeout(() => {
									_this.is_submit = false;
									uni.redirectTo({
										url: '/pages/index/reserveOrder/reserveSuccess'
									})
								}, 800)
							},
							fail: (res) => {
								console.log(res);
								const {
									orderId,
									outOrderNo,
									errNo,
									errMsg,
									errLogId
								} = res;
								if (errLogId) {
									console.log("预下单失败", errNo, errMsg, errLogId);
								}
								if (orderId || outOrderNo) {
									console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
								}
								console.log(errNo, errMsg);
								if (errNo == 4) {
									_this.$message.info('支付已取消');
									setTimeout(() => {
										_this.is_submit = false;
										uni.redirectTo({
											url: '/pages/my/myOrder/orderDetails?order_id=' +
												_this.order_id
										})
									}, 800)
								} else {
									_this.is_submit = false;
									_this.$message.info('支付失败,请稍后重试');
								}
							},
							complete(err) {
								console.log(err);
							}
						});


					} else {
						uni.hideLoading();
						this.is_submit = false;
						this.$message.info(res.data.info);
					}
				}).catch(err => {
					this.is_submit = false;
					uni.hideLoading();
				})
			},

			// 生成抖音预订单  postPreOrder
			getPreOrder(order_id) {
				this.$api.post(global.apiUrls.postPreOrder, {
					order_id: order_id
				}).then(res => {
					// console.log(res);
					let orderInfo = res.data.data;
					if (res.data.code == 1) {
						uni.hideLoading();
						let _this = this;
						uni.requestPayment({
							provider: _this.provider,
							orderInfo: orderInfo,
							service: 5,
							getOrderStatus(status) {
								console.log(status);
							},
							success(res) {
								console.log(res);
								if (res.code == 0) {
									_this.$message.info('支付成功');
									setTimeout(() => {
										_this.is_submit = false;
										uni.redirectTo({
											url: '/pages/index/reserveOrder/reserveSuccess'
										})
									}, 800)
								} else if (res.code == 4 || res.code == 3) {
									_this.$message.info('支付已取消');
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/my/myOrder/orderDetails?order_id=' +
												_this.order_id
										})
									}, 800)
								} else {
									_this.is_submit = false;
									_this.$message.info('支付失败,请稍后重试');
								}
							},
							fail(err) {
								console.log(err);
								_this.is_submit = false;
								if (err.errMsg.indexOf('cancel') !== -1) {
									// 支付取消
									_this.$message.info('支付已取消');
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/my/myOrder/orderDetails?order_id=' +
												_this.order_id
										})
									}, 800)
								} else {
									// 支付失败
									_this.$message.info('支付失败,请稍后重试');
								}
							}
						})
					} else {
						this.$message.info(res.data.info);
						uni.hideLoading();
					}
				}).catch(err => {
					uni.hideLoading();
				})
			},
			// 检查下单时间是否超过一小时
			checkTime() {
				// 获取当前时间的时间戳
				const now = new Date();
				const nowTimestamp = now.getTime();
				// 获取另一个时间的时间戳，例如1小时前的时间
				const oneHourAgo = new Date(this.timeData.toDay); // 减去3600000毫秒（即1小时）
				const oneHourAgoTimestamp = oneHourAgo.getTime();
				// 计算时间差
				const timeDiff = oneHourAgoTimestamp - nowTimestamp;
				// 检查时间差是否超过1小时
				if (Math.abs(timeDiff) > 3600000) {
					console.log('时间差超过1小时');
				} else {
					console.log('时间差未超过1小时');
					this.checkTimeShow = true;
				}
			},

			// 下单数据
			getOrderInfo() {
				this.$api.post(global.apiUrls.placeOrder, {
					start_time: this.timeData.toDay,
					end_time: this.timeData.twoDay,
					store_id: this.store_id,
					car_id: this.car_id,
					door_to_door: this.door_to_door
				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						this.carInfo = res.data.data;
						this.customer_info = res.data.data.customer_info;
						if (this.carInfo.car_type == 1) {
							this.checkTime();
						}
						this.getCarInsure();
						setTimeout(() => {
							this.list1.forEach((item, index) => {
								uni.createSelectorQuery()
									.select(".main" + index)
									.boundingClientRect(res => {
										this.tops.push(Math.round(res.top));
										this.heights.push(Math.round(res.height));
									})
									.exec();
							})
							// console.log(this.heights);
						}, 1000)
					} else if (res.data.code == -1) {
						this.$message.info(res.data.info);
						setTimeout(() => {
							uni.navigateBack();
						}, 800)
					} else {
						this.$message.info(res.data.info);
					}
				})
			},
			// 车辆保障数据列表  postCarInsure
			getCarInsure() {
				this.$api.post(global.apiUrls.postCarInsure, {

				}).then(res => {
					// console.log(res);
					this.isShow = false;
					if (res.data.code == 1) {
						this.insureList = res.data.data;
						this.insureItem = "";
						let index = "";
						if (this.insureList.length > 0) {
							this.insureList.forEach((v, k) => {
								v.isSelect = 0;
								if (v.type == 1) {
									this.insureItem = v;
									index = k;
								}
							})
						}
						this.insureList.splice(index, 1);
						this.getCouponList();
					} else {
						this.$message.info(res.data.info);
					}
				})
			},
			// 打开地图
			openLocation() {
				let _this = this;
				if (_this.door_to_door == 0) {
					uni.openLocation({
						latitude: _this.storeInfo.lat,
						longitude: _this.storeInfo.lng,
						name: _this.storeInfo.store_name,
						address: _this.storeInfo.address,
						success: function() {
							console.log('success');
						},
						fail: function(err) {
							console.log(err);
						}
					});
				} else {
					uni.chooseLocation({
						success: function(res) {
							console.log(res);
							let location = res.longitude + ',' + res.latitude;
							if (res.name) {
								_this.getAddressInfo(location, res.longitude, res.latitude);
							} else {
								_this.$message.info('选择位置有误，请重新选择');
							}
						},
						fail: function(err) {
							console.log(err);
							if (err.errMsg.indexOf('cancel') !== -1) {
								// 选择位置取消
							} else {
								_this.$message.info('选择位置失败，请重试');
							}
						}
					});
				}
			},
			// 逆地理编码 根据经纬度获取到城市信息
			getAddressInfo(location, lng, lat) {
				let _this = this;
				uni.request({
					url: 'https://restapi.amap.com/v3/geocode/regeo?location=' + location +
						'&key=' + global.ampKey, //仅为示例，并非真实接口地址。
					header: {
						'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息
					},
					success: (res) => {
						console.log('456', res);
						if (res.data.status == '1') {
							let oldCityInfo = uni.getStorageSync('city');
							if (res.data.regeocode.addressComponent.citycode != oldCityInfo.citycode) {
								_this.$message.info('选择的位置不在当前城市，请重新选择');
								return;
							}
							
							let districtsIndex = res.data.regeocode.formatted_address.indexOf(res.data.regeocode.addressComponent.city);
							if (districtsIndex != -1) {
								districtsIndex = districtsIndex + res.data.regeocode.addressComponent.city.length;
							}
							let city_districts = res.data.regeocode.formatted_address.slice(districtsIndex, res.data.regeocode.formatted_address.length);
							let cityInfo = {
								citycode: res.data.regeocode.addressComponent.citycode,
								city: res.data.regeocode.addressComponent.city.slice(0, -1),
								city_districts: city_districts,
								cityAddress: res.data.regeocode.addressComponent.city + city_districts,
								lng: Number(lng),
								lat: Number(lat)
							}
							uni.setStorageSync('city', cityInfo);
							_this.cityInfo = cityInfo;
							_this.getPrice();
							
						} else {
							_this.$message.info('获取地理位置信息失败');
						}
				
					},
					fail: (error) => {
						// console.log(error)
						_this.$message.info('获取地理位置信息失败');
					}
				});
			},
			selectInsure(index, id) {
				if (this.insureList[index].isSelect == 0) {
					this.insureList.forEach((v, k) => {
						v.isSelect = 0;
					})
					this.insureList[index].isSelect = 1;
					this.insureIndex = index;
					this.insure_id = id;
					this.changeInsure = this.insureList[index];
				} else {
					this.insureList[index].isSelect = 0;
					this.insureIndex = -1;
					this.insure_id = "";
					this.changeInsure = "";
				}
				this.getPrice();
				this.$forceUpdate();
			},
			click2(item) {
				this.swiperIndex = item.index;
			},
			openNotice(index) {
				this.noticeShow = true;
				this.swiperIndex = index;
			},
			change(index) {
				this.current = index;
				uni.createSelectorQuery().select(".main" + index).boundingClientRect((data) => {
						console.log(data);
						let pageScrollTop = this.tops[index] - 44;
						uni.pageScrollTo({
							scrollTop: pageScrollTop, //滚动高度
							duration: 300, //过渡时间
						});
						// this.throttle = true;
						// setTimeout(() => {
						// 	this.throttle = false;
						// }, 1000);
					})
					.exec();

			},
			onDayClick(data) {
				this.curDate = data.date;
			},
			selectPay(id) {
				this.pay_id = id;
			},
			seeCalendar() {
				this.show = true;
				// let today = this.$refs.ren.getToday().date;
				// this.curDate = today;
				// this.markDays.push(today);
			},
			getdiffdate(stime, etime) {
				//初始化日期列表，数组
				var diffdate = new Array();
				var i = 0;
				//开始日期小于等于结束日期,并循环
				while (stime <= etime) {
					diffdate[i] = stime;

					//获取开始日期时间戳
					var stime_ts = new Date(stime).getTime();
					// console.log('当前日期：'+stime   +'当前时间戳：'+stime_ts);

					//增加一天时间戳后的日期
					var next_date = stime_ts + (24 * 60 * 60 * 1000);

					//拼接年月日，这里的月份会返回（0-11），所以要+1
					var next_dates_y = new Date(next_date).getFullYear() + '-';
					var next_dates_m = (new Date(next_date).getMonth() + 1 < 10) ? '0' + (new Date(next_date).getMonth() +
						1) + '-' : (new Date(next_date).getMonth() + 1) + '-';
					var next_dates_d = (new Date(next_date).getDate() < 10) ? '0' + new Date(next_date).getDate() :
						new Date(next_date).getDate();

					stime = next_dates_y + next_dates_m + next_dates_d;

					//增加数组key
					i++;
				}
				this.markDays = diffdate
				// console.log(diffdate);
			},

			//拨打电话
			getgiveMobile() {
				let _this = this;
				uni.makePhoneCall({
					phoneNumber: _this.carInfo.store_phone, //仅为示例
					success: res => {
						console.log(res);
					},
					fail: err => {
						console.log(err);
					}
				});
			},
			customerClose() {
				this.customerStatus = false;
			},
			
			// 预览图片
			previewImg(image) {
				let arr = [];
				arr.push(image);
				uni.previewImage({
					current: 0,
					urls: arr
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	// .slidertab {
	//   background: #f5f9fd;
	//   border-radius: 16px 16px 0px 0px;
	//   padding: 0 32px;

	// }


	.warp {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100%;
	}

	.rect {
		width: 520rpx;
		height: 350rpx;
		background-color: #fff;
		border-radius: 20rpx;
	}

	.coupon_num_title {
		font-size: 32rpx;
		font-weight: 500;
		text-align: center;
		padding: 32rpx 0;
	}

	.coupon_num_text {
		box-sizing: border-box;
		font-size: 28rpx;
		background: #eee;
		margin: 24rpx 32rpx 0;
		height: 72rpx;
		line-height: 72rpx;
		padding: 0 24rpx;
		border-radius: 16rpx;
		display: flex;
		align-items: center;
		justify-content: center;

		input {
			flex: 1;
		}
	}

	.coupon_num_tips {
		font-size: 28rpx;
		margin: 24rpx 32rpx 0;
	}

	.coupon_num_btn {
		padding: 0 32rpx;
		margin-top: 48rpx;

		.coupon_num_btn_1 {
			font-size: 26rpx;
			width: 180rpx;
			height: 58rpx;
			background: #eee;
			border-radius: 15rpx;
		}

		.coupon_num_btn_2 {
			font-size: 26rpx;
			width: 180rpx;
			height: 58rpx;
			background: #FC5B03;
			color: #fff;
			border-radius: 15rpx;
		}
	}





	.tabs_view {
		height: 88rpx;
		width: 100%;
		position: fixed;
		left: 0;
		background: #fff;
		z-index: 100;
	}

	.notice_info {
		.title_text {
			font-size: 32rpx;
			font-weight: bold;
			text-align: center;
			padding-top: 32rpx;
		}

		.notice_title {
			padding: 24rpx 0;
		}

		.notice_text {
			height: 300rpx;

			.notice_swiper {
				width: 100%;
				height: 100%;

				.swiper-item {
					width: 100%;
					height: 100%;
					padding: 0 32rpx 24rpx;
					font-size: 28rpx;
				}
			}
		}
	}

	.popup_price {
		background: #F6F7FB !important;
		padding-bottom: 32rpx;

		.popup_money {
			display: flex;
			align-items: center;
			justify-content: center;

			.money_1 {
				font-weight: bold;
				font-size: 40rpx;
				color: #000000;
			}

			.money_2 {
				font-weight: bold;
				font-size: 64rpx;
				color: #000000;
			}
		}

		.pay_list {
			background: #fff;
			padding: 8rpx 24rpx;
			border-radius: 16rpx;
			margin: 32rpx 32rpx 42rpx;

			.pay_item {
				padding: 24rpx 0;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.pay_item_le {
					display: flex;
					align-items: center;

					image {
						width: 52rpx;
						height: 52rpx;
						margin-right: 20rpx;
					}

					text {
						font-weight: 500;
						font-size: 30rpx;
						color: #111111;
					}
				}

				.pay_item_ri {
					width: 32rpx;
					height: 32rpx;
				}
			}
		}

		.pay_btn {
			width: 692rpx;
			height: 96rpx;
			background: #FC5B03;
			border-radius: 80rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 30rpx;
			color: #FFFFFF;
			margin: 0 auto;
		}
	}

	.popup_view {
		width: 642rpx;
	}

	.popup_title {
		font-weight: 500;
		font-size: 36rpx;
		color: #000000;
		padding: 32rpx 32rpx 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.popup_calendar {
		padding: 0 8rpx 12rpx;
	}

	.u_tabs {
		height: 78rpx;
		position: sticky;
		top: 0;
		z-index: 10;
		display: flex;
		background-color: #fff;

		.tab_item {
			flex: 1;
			background-color: #fff;

			// line-height: 100px;
			&.active {
				background-color: rgb(55, 185, 169);
			}
		}
	}

	.vehicle_information {
		padding: 24rpx;
		width: 100%;
		height: 260rpx;
		background: url(https://speed.zhongchuxing.com/dyimages/226.png) no-repeat;
		background-size: 100% 100%;
		position: relative;

		.car_content {
			display: flex;
			align-items: center;
			justify-content: space-between;

			.car_name {
				.car_name_1 {
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 30rpx;
					color: #111111;
					text-overflow: ellipsis;
					overflow: hidden;
					white-space: nowrap;
				}

				.car_name_2 {
					margin-top: 16px;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 26rpx;
					color: #111;
					text-overflow: ellipsis;
					overflow: hidden;
					white-space: nowrap;

					.car_name_2_1 {
						color: #CCCCCC;
					}
				}
			}

			.car_img {
				width: 192rpx;
				height: 144rpx;
				position: relative;

				.car_icon {
					width: 80rpx;
					height: 18rpx;
					position: absolute;
					top: 8rpx;
					left: 8rpx;
				}
			}
		}

		/deep/.u-lazy-item {
			width: 192rpx !important;
			height: 144rpx !important;
		}

		.license_plate {
			width: 702rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			background: #fff;
			padding: 16rpx 20rpx;
			border-radius: 16rpx;
			position: absolute;
			left: 24rpx;
			bottom: 0;

			.plate_le {
				display: flex;
				align-items: center;

				.plate_le_1 {
					width: 40rpx;
					height: 40rpx;
				}

				.plate_le_2 {
					font-weight: 500;
					font-size: 26rpx;
					color: #FC5B03;
				}

				.plate_le_3 {
					font-weight: 500;
					font-size: 26rpx;
					color: #FC5B03;
				}
			}

			.plate_ri {
				background: rgba(26, 102, 250, 0.05);
				border-radius: 4rpx;
				padding: 4rpx 8rpx;
				display: flex;
				align-items: center;

				.plate_ri_1 {
					width: 20rpx;
					height: 20rpx;
					margin-right: 4rpx;
				}

				.plate_ri_2 {
					font-weight: 500;
					font-size: 22rpx;
					color: #1A66FA;
				}
			}
		}
	}

	.vehicle_method {
		height: 80rpx;
		margin: 16rpx 24rpx 0;
		transform: translateY(4rpx);
		position: relative;

		image {
			width: 104rpx;
			height: 40rpx;
			position: absolute;
			top: -10rpx;
			right: 14rpx;
		}

		&_item {
			width: 50%;
			font-weight: 400;
			font-size: 28rpx;
			color: #454545;
			text-align: center;
			// position: relative;
		}

		&_item_1 {
			height: 100%;
			background: url(https://speed.zhongchuxing.com/dyimages/21.png) no-repeat;
			background-size: 100% 100%;
			font-weight: 500;
			font-size: 32rpx;
			color: #252525;
		}

		&_item_2 {
			height: 100%;
			background: url(https://speed.zhongchuxing.com/dyimages/22.png) no-repeat;
			background-size: 100% 100%;
			font-weight: 500;
			font-size: 32rpx;
			color: #252525;
		}
	}

	.car_date {
		background: #fff;
		margin: 0 24rpx 20rpx;
		border-radius: 0 0 16rpx 16rpx;
		padding: 0 10rpx 10rpx;

		.car_date_bg {
			background: url(https://speed.zhongchuxing.com/dyimages/23.png) no-repeat;
			background-size: 100% 100%;
			padding: 24rpx 20rpx;
		}

		.date_content {
			background: #F7F7F7;
			border-radius: 16rpx;
			padding: 20rpx 54rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.date_item {
				.date_item_1 {
					font-size: 34rpx;
					font-weight: bold;
					color: #111111;
				}

				.date_item_2 {
					display: flex;
					align-items: center;
					justify-content: space-between;
					font-size: 26rpx;
					color: #999;
				}
			}

			.date_days {
				display: flex;
				align-items: center;

				.days_line {
					width: 24rpx;
					height: 2rpx;
					background: #CCCCCC;
					border-radius: 2rpx;
				}

				.days_num {
					padding: 6rpx 34rpx;
					background: #FFFFFF;
					border-radius: 24rpx;
					border: 2rpx solid #CCCCCC;
					font-size: 26rpx;
					color: #111111;
				}
			}
		}

		.time_popup {
			padding: 46rpx 24rpx 45rpx;

			&_item {}

			&_item_1 {
				font-weight: 400;
				font-size: 24rpx;
				color: #999999;
			}

			&_item_2 {
				font-weight: 600;
				font-size: 28rpx;
				color: #111111;
				margin-top: 12rpx;
			}

			&_day {
				text-align: center;
			}

			&_day_1 {
				font-weight: 400;
				font-size: 24rpx;
				color: #666666;
			}

			&_day_2 {
				width: 64rpx;
				height: 8rpx;
				margin-top: 22rpx;
			}
		}

		.quotation_information {
			display: flex;
			align-items: center;
			justify-content: space-between;

			.information {
				flex: 1;

				.information_2 {
					.information_2_1 {
						.information_2_1_1 {
							width: 72rpx;
							height: 30rpx;
							background: #FC5B03;
							border-radius: 6rpx;
							font-weight: 600;
							font-size: 24rpx;
							color: #FFFFFF;
						}

						.information_2_2_1 {
							font-weight: 600;
							font-size: 30rpx;
							color: #111111;
							margin-left: 5rpx;
						}

						.information_2_2_3 {
							font-weight: 400;
							font-size: 24rpx;
							color: #111111;
						}
					}

					.information_2_2 {
						.information_2_2_2 {
							font-weight: 400;
							font-size: 24rpx;
							color: #999999;
							margin-top: 12rpx;
						}
					}
				}
			}

			.quotation_address {
				text-align: center;
				padding-top: 16rpx;

				image {
					width: 60rpx;
					height: 60rpx;
				}

				.address_text {
					font-weight: 400;
					font-size: 20rpx;
					color: #1A66FA;
				}
			}

		}
	}

	.lianxi {
		background: #fff;
		border-radius: 16rpx;
		margin: 0 24rpx 20rpx;
		padding: 24rpx 20rpx;

		.lianxi_titel {
			font-weight: bold;
			font-size: 30rpx;
			color: #111111;
		}

		image {
			width: 30rpx;
			height: 30rpx;
		}
	}

	.deposit_bg {
		background: #E8F1FF;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 20rpx 24rpx 20rpx;

		.deposit_1 {
			width: 33rpx;
			height: 33rpx;
		}

		.deposit_2 {
			color: #1A66FA;
			margin: 0 16rpx;
			font-size: 30rpx;
		}

		.deposit_3 {
			font-size: 26rpx;
			color: #111111;
		}
	}

	.guarantee {
		background: #fff;
		border-radius: 16rpx;
		margin: 0 24rpx 20rpx;
		padding: 24rpx 20rpx;

		.guarantee_title {
			font-weight: bold;
			font-size: 30rpx;
			color: #111111;
			margin-bottom: 20rpx;
		}

		.guarantee_content {
			background: linear-gradient(90deg, #FFF8F5 0%, #FFFFFF 21%);
			border: 2rpx solid transparent;
			border-radius: 16rpx;
			background-clip: padding-box, border-box;
			background-origin: padding-box, border-box;
			background-image: linear-gradient(90deg, #FFF8F5 0%, #FFFFFF 21%), linear-gradient(270deg, rgba(247, 247, 247, 1), rgba(246, 247, 251, 1));
			display: flex;

			.service_title {
				width: 140rpx;

				.title_1 {
					width: 140rpx;
					height: 160rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					font-weight: 500;
					font-size: 22rpx;
					color: #666666;
					padding: 8rpx;
					border-bottom: 2rpx solid #eee;
				}

				.title_2 {
					width: 140rpx;
					height: 120rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					font-weight: 500;
					font-size: 22rpx;
					color: #666666;
					padding: 8rpx;
				}

				.title_3 {
					width: 140rpx;
					height: 160rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					font-weight: 500;
					font-size: 26rpx;
					color: #111111;
					padding: 8rpx;
					border-top: 2rpx solid #eee;
				}
			}

			.service_list {
				width: calc(100% - 140rpx);

				.service_scroll {
					white-space: nowrap;
				}

				.service_item {
					display: inline-block;
					width: 172rpx;

					.item_1 {
						height: 158rpx;
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
						border-bottom: 2rpx solid #eee;
						padding: 8rpx;
						text-align: center;
						white-space: normal;

						image {
							width: 52rpx;
							height: 52rpx;
						}

						view {
							font-weight: bold;
							font-size: 22rpx;
							color: #000000;
						}
					}

					.item_2 {
						font-size: 22rpx;
						color: #111111;
						height: 120rpx;
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
						padding: 8rpx;
						text-align: center;
						white-space: normal;

						image {
							width: 32rpx;
							height: 32rpx;
						}
					}

					.item_3 {
						height: 158rpx;
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
						padding: 8rpx;
						text-align: center;
						border-top: 2rpx solid #eee;

						.item_3_1 {
							font-weight: bold;
							font-size: 22rpx;
							color: #000000;
						}

						.item_3_2 {
							margin-top: 8rpx;
							font-weight: 400;
							font-size: 22rpx;
							color: #FC5B03;
							width: 92rpx;
							height: 40rpx;
						}

						.item_3_3 {
							font-weight: bold;
							font-size: 22rpx;
							color: #EF2E28;
						}

						.item_3_4 {
							margin-top: 8rpx;
							width: 92rpx;
							height: 40rpx;
							background: #FC5B03;
							border-radius: 38rpx;
							display: flex;
							align-items: center;
							justify-content: center;
							font-weight: 400;
							font-size: 22rpx;
							color: #FFFFFF;
						}
					}
				}

				.service_item_active {
					border: 2rpx solid transparent;
					border-radius: 16rpx;
					background-clip: padding-box, border-box;
					background-origin: padding-box, border-box;
					background-image: linear-gradient(to right, rgba(246, 247, 251, 1), rgba(246, 247, 251, 1)), linear-gradient(90deg, rgba(253, 150, 2, 1), rgba(252, 91, 3, 1));
				}
			}
		}
	}

	.preferential {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 0 24rpx;

		.coupon {
			display: flex;
			align-items: center;
		}

		.coupon_le {
			font-weight: 500;
			font-size: 26rpx;
			color: #111111;
			width: 160rpx;
		}

		.coupon_ri {
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: flex-end;

			image {
				width: 32rpx;
				height: 32rpx;
			}

			.coupon_ri_1 {
				width: 140rpx;
				height: 40rpx;
			}
		}
	}

	.order_detail {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;
	}

	.order_item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 24rpx;

		.order_item_le {
			font-size: 26rpx;
			color: #111111;
		}

		.order_item_ri {
			font-weight: bold;
			font-size: 26rpx;
			color: #111111;

			.order_item_ri_1 {
				font-weight: 500;
				font-size: 26rpx;
				color: #FC5B03;
				margin-right: 16rpx;
			}
		}
	}

	.details_text {
		margin: 16rpx 32rpx;
	}

	.order_line {
		width: 100%;
		height: 2rpx;
		background: #E7E7E7;
	}

	.order_price {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		margin-top: 20rpx;

		.order_price_1 {
			font-weight: 400;
			font-size: 26rpx;
			color: #111111;
		}

		.order_price_2 {
			font-weight: bold;
			font-size: 30rpx;
			color: #EF2E28;
		}
	}

	.deposit {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;

		.deposit_text {
			display: flex;

			image {
				width: 40rpx;
				height: 40rpx;
			}

			.explain {
				width: calc(100% - 40rpx);
				padding-left: 12rpx;
				display: flex;
				align-items: center;

				.explain_icon {
					width: 28rpx;
					height: 28rpx;
					margin-left: 48rpx;
				}

				.explain_text {
					.explain_text_1 {
						font-weight: bold;
						font-size: 26rpx;
						color: #111111;
					}

					.explain_text_2 {
						margin-top: 12rpx;
						font-size: 22rpx;
						color: #666666;
						line-height: 26rpx;
					}
				}
			}
		}
	}

	.notice {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;

		.notice_item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 24rpx;

			.notice_item_le {
				font-weight: 400;
				font-size: 26rpx;
				color: #111111;
			}

			image {
				width: 32rpx;
				height: 32rpx;
			}
		}
	}
	
	.customer_view {
		margin: 24rpx 24rpx 0;
		.customer_top {
			font-size: 24rpx;
			color: #999999;
			.customer_term {
				color: #2F51FF;
			}
		}
		.customer_botm {
			font-size: 24rpx;
			color: #999999;
			margin-top: 16rpx;
		}
	}

	.money_footer {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		height: 120rpx;
		position: fixed;
		bottom: calc(0rpx + var(--window-bottom));
		left: 0;
		background: #fff;
		z-index: 10;
		padding: 0 24rpx 0 48rpx;

		.footer_le {
			.footer_le_1 {
				display: flex;
				align-items: center;
				font-weight: 500;
				font-size: 30rpx;
				color: #EF2E28;

				.footer_le_1_1 {
					font-weight: bold;
					font-size: 48rpx;
					color: #EF2E28;
				}

				.footer_le_1_2 {
					display: inline-block;
					transform: translateY(4rpx);
					font-size: 24rpx;
					color: #999999;
					text-decoration: line-through;
					margin-left: 15rpx;

				}
			}

			.footer_le_2 {
				font-weight: 500;
				font-size: 26rpx;
				color: #FC5B03;
			}
		}

		.footer_ri {
			display: flex;
			align-items: center;

			.footer_ri_1 {
				font-weight: 400;
				font-size: 26rpx;
				color: #1A66FA;
			}

			.footer_ri_2 {
				margin-left: 24rpx;
				width: 200rpx;
				height: 74rpx;
				background: #FC5B03;
				border-radius: 80rpx;
				font-weight: bold;
				font-size: 32rpx;
				color: #FFFFFF;
				display: flex;
				align-items: center;
				justify-content: center;
				font-family: PingFang SC, PingFang SC;
			}
		}
	}

	.tip_title {
		font-weight: bold;
		font-size: 30rpx;
		color: #111111;
		margin-bottom: 32rpx;

		.tip_title_text {
			font-weight: 400;
			font-size: 22rpx;
		}
	}

	.coupon_scroll {
		height: 700rpx;
	}

	.list {
		padding: 4rpx 24rpx 32rpx;

		.list_item {
			width: 100%;
			margin-top: 20rpx;
			background: #fff;
			border-radius: 16rpx;
			display: flex;

			.list_item_le {
				width: 230rpx;
				height: 200rpx;
				background: rgba(252, 91, 3, 0.05);
				text-align: center;
				padding-top: 58rpx;
				position: relative;

				.le_price {
					display: flex;
					align-items: center;
					justify-content: center;

					.le_price_1 {
						font-weight: bold;
						font-size: 30rpx;
						color: #FC5B03;
					}

					.le_price_2 {
						font-weight: bold;
						font-size: 52rpx;
						color: #FC5B03;
					}
				}

				.le_tip {
					font-weight: 500;
					font-size: 22rpx;
					color: #FC5B03;
				}

				.le_title {
					position: absolute;
					left: 0;
					top: 0;
					width: 100%;
					height: 52rpx;
					border-radius: 16rpx 0 0 0;
					background: linear-gradient(to right, #FEEDE9, rgba(252, 91, 3, 0.01));
					font-weight: 500;
					font-size: 22rpx;
					color: #FC5B03;
					display: flex;
					align-items: center;
					padding: 0 20rpx;

				}
			}

			.list_item_ri {
				padding: 8rpx 0 0 28rpx;
				flex: 1;

				.ri_content {
					// width: calc(100% - 136rpx);
					width: 100%;

					.ri_content_1 {
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 30rpx;
						color: #111111;

						.content_text {
							flex: 1;
							height: 88rpx;
							display: -webkit-box;
							-webkit-box-orient: vertical;
							overflow: hidden;
							-webkit-line-clamp: 2;
						}
					}

					.ri_content_2 {
						font-weight: 400;
						font-size: 22rpx;
						color: #666666;
						margin-top: 8rpx;
					}

					.ri_content_3 {
						font-weight: 400;
						font-size: 26rpx;
						color: #666666;
						margin-top: 28rpx;
					}

					.ri_btn {
						width: 136rpx;
						height: 46rpx;
						border-radius: 40rpx;
						border: 2rpx solid #FC5B03;
						font-weight: 500;
						font-size: 24rpx;
						color: #FC5B03;
						margin: 8rpx 0 0 auto;
					}
				}


			}
		}

		.rule_view {
			padding: 16rpx 0;

			.rule_top {
				padding: 0 24rpx 24rpx;
				color: #999;
				font-size: 24rpx;
			}

			.rule_bottom {
				border-top: 1px solid #eee;
				padding: 16rpx 24rpx 0;
				font-size: 24rpx;
				color: #999;
			}
		}
	}

	.wrongQuestion_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.wrongQuestion_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #111;
		line-height: 36rpx;
		width: 135rpx;
	}

	.wrongQuestion_fd0_0_c1 {
		font-size: 32rpx;
		font-weight: bold;
		color: #111;
		line-height: 50rpx;
	}

	.wrongQuestion_fd0_0_c2 {
		width: 135rpx;
		height: 45rpx;
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		text-align: right;
	}

	.wrongQuestion_flex_0 {
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 2000;
		top: 0rpx;
		background: #fff;
	}

	.page {
		min-height: calc(100vh - var(--window-bottom));
		background-size: 100% auto !important;
		background-color: #F6F7FB;
	}
</style>